package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 用户类
 * </p>
 *
 * @author cy
 * @since 2020-08-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    public static final int COMMON=0;

    public static final int ADMIN=1;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    private String account;

    private String password;

    /**
     * 区分普通用户和管理员
     */
    private Integer state;

    private String photo;

    private String nickname;

    private String phone;

    private String mail;

    private String intro;

    private String teamName;

    private String teamMan;

    private String teamPhone;

    private String teamInfor;

    /**
     * 团队认证审核情况
     */
    private Integer teamState;

    //请求中
    public static final int TEAM_REQUEST = 0;
    //通过审核
    public static final int TEAM_PASS = 1;
    //未通过审核
    public static final int TEAM_NO_PASS = -1;

    private String firmName;

    private String firmMan;

    private String firmPhone;

    private String firmInfor;

    /**
     * 企业认证审核情况
     */
    private Integer firmState;

    //请求中
    public static final int FIRM_REQUEST = 0;
    //通过审核
    public static final int FIRM_PASS = 1;
    //未通过审核
    public static final int FIRM_NO_PASS = -1;

    /**
     * 企业营业执照
     */
    private String firmFile;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
